

<html>
  <body>
    <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
    <!-- <script src="flv.js"></script> -->
    <video id="video" controls></video>
    <script>
    if(Hls.isSupported())
    {
        var video = document.getElementById('video');
        var hls = new Hls();
        // https://open.ys7.com/v3/openlive/G45642752_1_1.m3u8  高清
        // https://open.ys7.com/v3/openlive/G45642752_1_2.m3u8
        hls.attachMedia(video);
        hls.loadSource(' https://open.ys7.com/v3/openlive/D69556520_1_2.m3u8?expire=1707203741&id=544537017300557824&t=f788086414ffdb5c3dc24575c305bc57f6f7f35b38dba4572a413ae136f17d66&ev=100');
        
        hls.on(Hls.Events.MANIFEST_PARSED,function()
        {
            video.play();
        });
        hls.on(HLS.Events.ERROR, (event, data) => {
          console.log("加载失败");
        });
    }
    else if (video.canPlayType('application/vnd.apple.mpegurl'))
    {
        video.src = 'playlist.m3u8';
        video.addEventListener('canplay',function()
        {
            video.play();
        });
    }
    </script>
  </body>
</html>